class Person
{
    private String name;
    private String addr;
    private char sex;
    private int age;

    public Person(String name, String addr, char sex, int age) {
        this.name = name;
        this.addr = addr;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public String getAddr() {
        return addr;
    }

    public char getSex() {
        return sex;
    }

    public int getAge() {
        return age;
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public Person()
    {}
    public String toString()
    {
        return "name:" + this.name + ", addr:" + this.addr + ", sex:" + this.sex + ", age:" + this.age;
    }
}

class Student extends Person
{
    float mathGrade;
    float englishGrade;

    public Student(String name, String addr, char sex, int age, float mathGrade, float englishGrade) {
        super(name, addr, sex, age);
        this.mathGrade = mathGrade;
        this.englishGrade = englishGrade;
    }

    public Student(float mathGrade, float englishGrade) {
        this.mathGrade = mathGrade;
        this.englishGrade = englishGrade;
    }
    public Student()
    {}
    public String toString()
    {
        return "name:" + super.getName() + ", addr:" + super.getAddr()+ ", sex:" + super.getSex() + ", age:" + super.getAge() + ", mathGrade:" + this.mathGrade + ", englishGrade:" + this.englishGrade;
    }
}

public class ZhaiZhiJie06
{
    public static void main(String[] args) {
        Student stu = new Student("zhangsan","123",'男',30,95.5f,98.0f);
        System.out.println(stu.toString());
    }
}
